<template>
    <div class="cover">
        <img :src="cover" v-if="cover">
        <img v-else src="../assets/pp.jpg">
    </div>
</template>

<script setup>
    const props = defineProps({
        cover: {
            type: String
        }
    })

</script>

<style lang="scss">
    .cover {
        background: #ddd;
        display: flex;
        align-items: center;
        width: 100px;
        height: 100px;
        overflow: hidden;

        img {
            width: 100%;
        }
    }
</style>